<div class="form-group">
	<div class="col-sm-2 control-label">
		<?php echo $form->label($model,'bid_source_type'); ?>
	</div>
	<div class="col-sm-4">
		<?php echo $form->textFieldCAutoComplete($model,'bid_source_type',array(
		    'dataProvider' => array(
		        'class'  =>  'BidHistory',
		        'attribute'   =>  'bid_source_type',
		     )
		),array('class'=>'form-control'));?>
	</div>
</div> 

<div class="form-group">
	<div class="col-sm-2 control-label">
		<?php echo $form->label($model,'created'); ?>
	</div>
	<div class='col-sm-4'>
		<div class="input-group">
		      <div class="input-group-btn">
		        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Time <span class="caret"></span></button>
			        <ul class="dropdown-menu">
			          <li><a >Last 5 days</a></li>
			          <li><a >Last 10 days</a></li>
			          <li><a >Last 15 days</a></li>
			          <li><a >Last 20 days</a></li>
			          <li><a >Last 25 days</a></li>
			          <li><a >Last 30 days</a></li>
			        </ul>
		      </div><!-- /btn-group -->
		      <?php echo $form->textField($model,'created',array('class'=>'form-control'));?>
		      <?php echo $form->hiddenField($model,'last_days',array('class'=>'search-time'));?>
		    </div><!-- /input-group -->
	</div>
</div>

<div class="form-group">
	<div class="col-sm-2 control-label">
		<?php echo $form->label($model,'amount'); ?>
	</div>
	<div class='col-sm-4'>
		<div class="input-group">
		      <div class="input-group-btn">
		        <button type="button" class="btn btn-default dropdown-toggle"  data-target="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Operator <span class="caret"></span></button>
			        <ul class="dropdown-menu">
			          <li><a value='ge'><?php echo '>='?></a></li>
			          <li><a value='le'><?php echo '<='?></a></li>
			          <li><a value='eq'><?php echo '='?></a></li>
			        </ul>
		      </div><!-- /btn-group -->
		      <?php echo $form->textField($model,'amount',array('class'=>'form-control'));?>
		      <?php echo $form->hiddenField($model,'operator',array('class'=>'search-amount'));?>
		      <span class="input-group-btn">
		        <button class="btn btn-default" type="submit">Search</button>
		      </span>
		    </div><!-- /input-group -->
	</div>
</div>

<script>
	$('.dropdown-menu a').on('click',function(){
		$('.search-amount').val($(this).attr('value')).siblings('input');
		$('.search-time').val($(this).html());
	})
</script>